var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var schema = new mongoose.Schema({
    cateId: mongoose.Schema.ObjectId,
    /* schema definition */
    title: String,
    /*新闻标题*/
    category: String,
    /*新闻类别*/
    massage: String,
    /*新闻内容*/
    author: String,
    /*评论作者*/
    content: String,
    /*评论内容*/
    releasetime: Date,
    /*评论时间*/
    local: String,
    /*评论地点*/
    number: Number,
    /*评论数量*/
    fangshi: String,
    /*评论方式*/
    keywords: String /*评论关键字*/

});
schema.plugin(mongoosePaginate);
var Classify = mongoose.model('Newsp', schema);

module.exports = Classify; // Model.paginate()